package com.itheima.case2.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface UserRoleMapper {
    //根据id删除用户对应所有的角色
    @Delete("delete from t_user_role where user_id=#{id}")
    void deleteById(@Param("id") String id);

    //添加用户角色关系信息
    @Insert("insert into t_user_role values (#{userId},#{roleId})")
    void insertUserAndRole(@Param("userId") String userId,@Param("roleId") String roleId);
}
